﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;

using BMS.Utilities;

namespace BMS.Models.DataAccess
{
    public class GeneralRepository
    {
        public IEnumerable<SelectListItem> GetInvoiceTypesForDropDownList(List<String> modelList)
        {
            List<SelectListItem> InvoiceTypeList = new List<SelectListItem>();

            foreach (String invoiceType in modelList)
            {
                SelectListItem sListItem = new SelectListItem();
                sListItem.Text = invoiceType;
                sListItem.Value = invoiceType;

                InvoiceTypeList.Add(sListItem);
            }

            return InvoiceTypeList;
        }

        public IEnumerable<SelectListItem> GetReportTypesForDropDownList(List<String> modelList)
        {
            List<SelectListItem> ReportTypeList = new List<SelectListItem>();

            foreach (String reportType in modelList)
            {
                SelectListItem sListItem = new SelectListItem();
                sListItem.Text = reportType;
                sListItem.Value = reportType;

                ReportTypeList.Add(sListItem);
            }

            return ReportTypeList;
        }

        public IEnumerable<SelectListItem> GetEmergencyTypesForDropDownList(List<String> modelList)
        {
            List<SelectListItem> EmergencyTypeList = new List<SelectListItem>();

            foreach (String emergencyType in modelList)
            {
                SelectListItem sListItem = new SelectListItem();
                sListItem.Text = emergencyType;
                sListItem.Value = emergencyType;

                EmergencyTypeList.Add(sListItem);
            }

            return EmergencyTypeList;
        }

        public IEnumerable<SelectListItem> GetCityTypesForDropDownList(List<String> modelList)
        {
            List<SelectListItem> CityTypeList = new List<SelectListItem>();

            foreach (String cityType in modelList)
            {
                SelectListItem sListItem = new SelectListItem();
                sListItem.Text = cityType;
                sListItem.Value = cityType;

                CityTypeList.Add(sListItem);
            }

            return CityTypeList;
        }

    }
}